package com.part2.action.system;

import java.io.PrintWriter;
import java.text.SimpleDateFormat;
import java.util.Date;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


public class CurrentSystemTime extends HttpServlet{
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) {
		try{
			SimpleDateFormat sdf=new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
			Date d=new Date();
			PrintWriter pw=resp.getWriter();
			pw.print(sdf.format(d));
		}catch(Exception e){
			e.printStackTrace();
		}
	}
	protected void doPost(HttpServletRequest req, HttpServletResponse resp) {
		doGet(req,resp);
	}

}
